﻿CREATE proc [dbo].[proc_SiteForm_GetItem]
(
	@id int
)
as
	select 
		sf.id,
		sf.OrderId,
		sf.ProductId,
		(select title from product p where sf.ProductId=p.Id) as ProductName,
		sf.CustomerId,
		sf.CustomerName,
		sf.ContactPerson,
		sf.ContactTel,
		sf.SignDate,
		sf.WebSitePrice,
		sf.Description,
		sf.CreateTime,
		sf.StateId,
		(select ss.title from SiteState ss where ss.id=sf.stateid) as StateName

	from siteform sf
	where 
		    sf.id = @id

